package com.hzw.saas.common.verify.enums;

/**
 * <p>
 *
 * </p>
 *
 * @author sonam
 * @since 2021/1/28 11:28
 */
public enum SmsType {
    RESET(0, "重置密码"),
    REGISTERED(1, "注册用户"),
    PAY(2, "支付"),
    CHANGE(3, "更换手机号"),
    DELETE(4, "删除账户"),

    ;

    private int value;
    private String text;

    SmsType(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int value() {
        return value;
    }

    public String text() {
        return text;
    }

    public static SmsType instance(int value) {
        for (SmsType smsType : values()) {
            if (smsType.value() == value) {
                return smsType;
            }
        }
        return null;
    }
}
